package view;

import java.awt.event.ActionListener;

import javax.swing.JButton;
/**
 *  this class is Graphic user interface of Marketing maneger that serve the Marketing meneger Employee, which extends MarketingGui
 * @author jacob
 *
 */
public class MarketingManagerGui extends MarketingGui{
	
	/** all buttons of Marketing*/
	
	private JButton item_to_catalogB = null;
	private JButton add_categoryB = null;
	private JButton reportB = null;
	private JButton add_type = null;
	private JButton activate_campaign = null;
	private JButton add_area = null;
	private JButton reportCostB;
	
	/**
	 * constructor 
	 * this constructor add all the  Button on the Frame
	 */
	public MarketingManagerGui(){
		super();

		getContentPane().add(getItem_to_catalogB());
		getContentPane().add(getAdd_categoryB());
		getContentPane().add(getReportB());
		getContentPane().add(getAdd_type());
		getContentPane().add(getActivate_campaign());
		getContentPane().add(getAdd_area());
		getContentPane().add( getreportCostB());
		this.setTitle("Marketing maneger");
		this.setVisible(true);
		this.setResizable(false);
		
	}
	
	/*****************************************Getters and Setters of Button*****************************/
	public JButton getItem_to_catalogB() {
		if(item_to_catalogB == null){
			item_to_catalogB = new JButton("Add item to_catalog");
			item_to_catalogB.setBounds(10, 150, 180, 35);
		}
		return item_to_catalogB;
	}


	public JButton getAdd_categoryB() {
		if(add_categoryB == null){
			add_categoryB = new JButton("Add category");
			add_categoryB.setBounds(220, 150, 225, 35);
		}
		return add_categoryB;
	}


	public JButton getReportB() {
		if(reportB == null){
			reportB = new JButton("Produce sales report");
			reportB.setBounds(10, 200, 180, 35);
		}
		return reportB;
	}
	
	public JButton getreportCostB() {
		if(reportCostB == null){
			reportCostB = new JButton("Produce costumer report");
			reportCostB.setBounds(220, 200, 225, 35);
		}
		return reportCostB;
	}

	public JButton getAdd_type() {
		if(add_type == null){
			add_type = new JButton("Add type");
			add_type.setBounds(220,300, 225, 35);
		}
		return add_type;
	}
	
	public JButton getActivate_campaign() {
		if(activate_campaign == null){
			activate_campaign = new JButton("Activate campaign");
			activate_campaign.setBounds(10, 250, 180, 35);
		}
		return activate_campaign;
	}
	
	public JButton getAdd_area() {
		if(add_area == null){
			add_area = new JButton("Add area");
			add_area.setBounds(220, 250, 225, 35);
		}
		return add_area;
	}
	
	/********************************************add to all buttons ActionListener *************************************/
	public void addAddAreaActionListener(ActionListener listener){
		add_area.addActionListener(listener);
	}
	
	public void additemToCatalogActionListener(ActionListener listener){
		item_to_catalogB.addActionListener(listener);
	}
	
	public void addAddCategoryActionListener(ActionListener listener){
		add_categoryB.addActionListener(listener);
	}
	public void addReportActionListener(ActionListener listener){ //sales report
		reportB.addActionListener(listener);
	}
	
	public void addReportCostumerActionListener(ActionListener listener){ //customer report
		reportCostB.addActionListener(listener);
	}
	
	public void addAddTypeActionListener(ActionListener listener){
		add_type.addActionListener(listener);
	}
	public void addActivateCampaignActionListener(ActionListener listener){
		activate_campaign.addActionListener(listener);

	}
	
}


